package com.example.demo.javatest.thread;

/**
 * Created by liujiahao on 2019/2/2.
 */
public class Father {
    public String flag;


    public static void main(String[] args) {
        Thread t1=new Thread(new Runnable() {
            @Override
            public void run() {
                Son s=new Son();
                try {
                    Thread.sleep(2000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                s.send();
            }
        });
        t1.start();
        Thread t2=new Thread(new Runnable() {
            @Override
            public void run() {
                Son1 s=new Son1();
                s.send();
            }
        });
        t2.start();
        Thread t3=new Thread(new Runnable() {
            @Override
            public void run() {
                new son2().send();
            }
        });
        t3.start();

    }
}
